package polymorphism;

/**
 * Created by admin on 2016-11-17.
 */
class StudentLeader extends Student{

    private String post;

    StudentLeader(){}

    StudentLeader(String name,String sex,int age,String nationality,String school,String studentNo,String post){

        super(name,sex,age,nationality,school,studentNo);

        this.post=post;
    }

    public void meeting(){
        System.out.println(getName()+" is meeting");
    }

    public void work(){
        System.out.println(getName()+"'s work is study and meeting");
    }

    public String getPost() {
        return post;
    }

    public StudentLeader setPost(String post) {
        this.post = post;
        return this;
    }

    public String toString(){
        return super.toString()+" StudentLeader post:"+post;
    }

}
